package com.kevin.mybatis.stream;

import java.net.http.HttpClient;
import java.util.Comparator;
import java.util.Optional;
import java.util.function.IntSupplier;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class StreamDemo {
    public static void main(String[] args) {

        Stream<Integer> stream = Stream.of(12, 23, 44, 66, 9, 10, 8);


        //stream.sorted().forEach(System.out::println);
        //stream.sorted(Comparator.comparingInt((Integer i) -> i)).forEach(System.out::println);
//        stream.sorted((Integer i1,Integer i2)->i2-i1).forEach(System.out::println);
//        IntStream intStream = IntStream.rangeClosed(1, 1000);
//        intStream.forEach(System.out::println);

        /*Optional<String> optional = Optional.ofNullable("如花");

        optional.ifPresentOrElse(e -> {
            System.out.println(e);
        }, () -> {
            System.out.println("没有值别看了");
        });*/

        HttpClient httpClient = HttpClient.newHttpClient();
        
    }
}
